<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@include file="/WEB-INF/pages/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<s:url
	id="regist" action="regist" namespace="/"
	includeParams="none"></s:url>
<title>登录</title>
<script language="javascript">
   function upload_self_msg(){
	dialogx("请输入您的密码,然后修改个人资料","text:<p align=center>密码：<input type='password' id='old_pas' onKeyDown='if (event.keyCode==13)updateStudent()'>&nbsp;<a href='javascript:updateStudent()'>确定</a></p>","500px","auto","text");
};
 function updateStudent(){
      var password;
      password= $E("old_pas").value;
      var pas="${student.password}"
      if(password==pas){
      window.location.href = "${regist}";
      }else{
      alert("您输入的密码不正确");   
      }
};
function loginform_submit(){
  var token =document.getElementById("token").value;
  var temp_token ="${token}";
  if(token ==temp_token){
    loginform.submit();
  }else{
    alert("验证码不正确");
    
   document.getElementById("token").value="";
  }
  
}
</script>
</head>
<body>
<s:if test="%{#session.student == null}">
	<table width="178" height="816" border="0" align="center"
		cellpadding="0" cellspacing="0" id="login">
		<tr>
			<td width="178" height="43" align="center"><img
				src="${context_path}/images/use.gif" width="170" height="43"></td>
		</tr>
		<tr width="160">
			<td height="143" background="${context_path}/images/login_bj.gif"
				align="center">
			<table width="100" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td height="6"></td>
				</tr>
			</table>
			<s:form action="login_front" theme="simple" id="loginform"
				namespace="/">
				<table width="154" border="0" align="center" cellpadding="0"
					cellspacing="0">
					<tr>
					  <td height="23" class="menu_1">帐　号： 
				      <s:textfield
							name="user.username" cssClass="text"
							cssStyle="width:95px; height:20px"></s:textfield></td>
					</tr>
					<tr>
						<td width="154" height="23" class="menu_1">密　码：
					      <s:password name="user.password" cssClass="text"
							cssStyle="width:95px; height:20px"></s:password></td>
					</tr>
					<tr>
						<td width="150" height="23" align="left" class="menu_1">
						验证码：
					  <s:textfield name="token" cssClass="text"
							cssStyle="width:50px; height:20px"  onkeydown="if (event.keyCode==13)loginform_submit()"></s:textfield>&nbsp;${token}</td>
					</tr>
					<tr>
					  <td height="15"> ${loginError }</td>
					</tr>

					<tr>
						<td width="173" height="35" align="center" class="menu_1"><a
							onclick="loginform_submit();"
							onmouseover="this.style.cursor='pointer'" ><img
							src="${context_path}/images/user.gif" width="62" height="21"
							border="0" /></a> <a
							href="${context_path}/admin/to_create_user.action?userType=frontStudent">
						<img src="${context_path}/images/reg.gif" width="80" height="21"
							border="0" /></a></td>
					</tr>
			  </table>
		      </s:form></td>
		</tr>

		<!-- 提问列表 -->
		<tr>
			<td height="245">
			  <table width="100" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="6"></td>
                </tr>
              </table>
			  <table width="100" border="0" cellspacing="0" cellpadding="0"
				align="center">
				<tr>
					<td align="right">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<a href="${context_path}/tw_more.action">更多</a>
						</td>
				</tr>
				<tr>
					<td><img src="${context_path}/images/tw_t.gif" width="182"
						height="43"/></td>
				</tr>
				<tr>
				  <td height="202"  background="${context_path}/images/tw_bj.gif">
				  <table width="142" border="0" align="center" cellpadding="0" cellspacing="0">
                    <c:forEach var="i" items="${questionList}" varStatus="status"
									end="5">
                      <tr>
                        <td width="157" height="20" class="text"><span class="font_yellow" >·</span> <a href="showTwDetail.action?question.id=${i.id }">${i.problem
                          } </a></td>
                      </tr>
                      <tr>
                        <td height="1" colspan="2"
											background="${context_path}/images/3-1.gif"></td>
                      </tr>
                    </c:forEach>
                  </table></td>
				</tr>
				
			</table>
		  </td>
		</tr>
		<!-- 提问列表end -->
		<tr>
			<td valign="bottom"><img
				src="${context_path}/images/search_bj.gif" width="181" height="46" /></td>
		</tr>
		<tr>
			<td height="232" background="${context_path}/images/search_bj1-1.gif">

			<table width="170"  height="217" border="0" align="center"
				cellpadding="0" cellspacing="0">
				<tr>
					<td height="77" align="center"><a
						href="${context_path}/xxk.action"><img
						src="${context_path}/images/search_bj10.gif" width="74"
						height="75" border="0" /></a></td>
					<td align="center"><a
						href="javascript:web_orders(1364,'新学员咨询室')"><img
						src="${context_path}/images/search_bj11.gif" width="77"
						height="77" border="0" /></a></td>
				</tr>
				<tr>
					<td height="71" align="center"><a
						href="${context_path}/problem.action"><img
						src="${context_path}/images/search_bj4.gif" width="80" height="71"
						border="0" /></a></td>
					<td align="center"><a href="${context_path}/use.action"><img
						src="${context_path}/images/search_bj5.gif" width="79" height="71"
						border="0" /></a></td>
				</tr>
				<tr>
					<td height="69" align="center"><a
						href="${context_path}/buy.action"><img
						src="${context_path}/images/search_bj6.gif" width="80" height="69"
						border="0" /></a></td>
					<td align="center"><a href="${context_path}/with.action"><img
						src="${context_path}/images/search_bj7.gif" width="79" height="69"
						border="0" /></a></td>
				</tr>
			</table>

			</td>
		</tr>
		<tr>
			<td><img src="${context_path}/images/lx.gif" width="179"
				height="96"></td>
		</tr>
  </table>
</s:if>
<s:else>


	<table width="100%" border="0" cellspacing="0" cellpadding="0"
		id="load">
		<tr>
			<td width="17" height="571">&nbsp;</td>
			<td width="174" valign="top">
			<table width="174" height="137" border="0" align="center"
				cellpadding="0" cellspacing="0">
				<tr>
					<td width="174" height="43" align="center"><img
						src="${context_path}/images/use1.gif" width="170" height="43"/></td>
				</tr>
				<tr>
					<td height="71" align="center" valign="top">
					<table width="169" border="0" align="right" cellpadding="0"
						cellspacing="0">
						<tr>
							<td height="114" align="center">
							<table width="138" height="113" border="0" cellpadding="0"
								cellspacing="1" bgcolor="#CCCCCC">
								<tr>
									<s:if test="%{#session.student.picture}!=''">
									<td align="center" bgcolor="#FFFFFF"><img
										src="${context_path}/${student.picture}" width="60"
										height="60" id="face"/></td>
									</s:if><s:else>
									<td align="center" bgcolor="#FFFFFF"><img
										src="${context_path}/images/face/1/0.jpg" width="60"
										height="60" id="face"/></td>
									</s:else>
								</tr>
							</table>
							<table width="141" border="0" cellspacing="0" cellpadding="0" class="text">
								<tr>
									<td width="141" height="18">姓名：<span id="username_span">${student.realName
									}</span></td>
								</tr>
								<tr>
									<td height="18">学校：<span id="school_span"><s:if test="%{#session.student.school!=null}">${student.school.schoolname}</s:if><s:else>${student.schoolName}</s:else></span></td>
								</tr>
								<tr>
									<td height="18">年级：<span id="grade_span">${loginGrade.name}</span></td>
								</tr>
								<tr>
									<td height="18">签名：<span id="word_span">${student.remark}</span></td>
								</tr>
								<tr>
									<td height="18">积分：<span id="word_span">${student.integral}</span></td>
								</tr>
							</table>

							</td>
						</tr>

						<tr>
							<td height="22" align="center"><a
								href="${context_path}/showInfo.action"><img
								src="${context_path}/images/xgzl.gif" width="88" height="17"
								border="0"/></a> <a href="${context_path}/exit_front.action"><img
								src="${context_path}/images/out.gif" width="41" height="17"
								border="0"/></a></td>
						</tr>
					</table>
					</td>
				</tr>

			</table>
			<table width="100" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td height="4"></td>
				</tr>
			</table>


			<table width="176" height="261" border="0" align="center"
				cellpadding="0" cellspacing="0">
				<tr>
					<td height="31" colspan="2" align="center"><img
						src="${context_path}/images/search_bj2.gif" width="181"
						height="39"/></td>
				</tr>
				<tr>
					<td height="230" background="${context_path}/images/search_bj1.gif">
					<table width="151" border="0" align="center" cellpadding="0"
						cellspacing="0" class="text6">

						<tr>
							<td height="28" align="center"><img
								src="${context_path}/images/png-06.png" width="22" height="22"/></td>
							<td height="28" class="STYLE22"><a href="myroom1.action"
								target="_blank">我的语音教室</a></td>
						</tr>
						<tr>
							<td height="28" align="center"><c:if test="${isNew>0}"><a href="${context_path}/my_finished_tw.action" target="I1"><img
								src="${context_path}/images/xinfeng.gif" width="22" height="22" border="0"/></a></c:if><c:if test="${isNew<=0}"><img
								src="${context_path}/images/png-07.png" width="22" height="22"/></c:if></td>
							<td height="28" class="STYLE22"><a href="mytw1.action"
								target="_blank">我的提问列表</a></td>
						</tr>
						<tr>
							<td height="28" align="center"><img
								src="${context_path}/images/png-03.png" width="22" height="22"/></td>
							<td height="28" class="STYLE22"><a href="myhomework1.action"
								target="_blank">我的作业列表</a></td>
						</tr>
						<tr>
							<td height="28" align="center"><img
								src="${context_path}/images/png-02.png" width="22" height="22"/></td>
							<td height="28" class="STYLE22"><a href="myexame1.action"
								target="_blank">我的试卷列表</a></td>
						</tr>
						<tr>
							<td height="28" align="center"><img
								src="${context_path}/images/png-05.png" width="22" height="22"/></td>
							<td height="28" class="STYLE22"><a href="mybook1.action"
								target="_blank">我的教材列表</a></td>
						</tr>
						<tr>
							<td width="41" height="28" align="center"><img
								src="${context_path}/images/png-01.png" width="22" height="22"/></td>
							<td width="128" height="28" class="STYLE22"><a
								href="javascript:upload_self_msg()">个人信息修改</a></td>
						</tr>
						<tr>
							<td height="28" align="center"><img
								src="${context_path}/images/png-08.png" width="22" height="22"/></td>
							<td height="28" class="STYLE22"><a href="help.action"
								target="_blank">网站使用说明</a></td>
						</tr>
					</table>
					</td>
				</tr>
			</table>
			</td>
		</tr>
	</table>
</s:else>
<!--  script>

var username="${user.username }";

var school="${user.school.schoolname}";
var grade="${user.grade }";
var word ="${user.remark}";

document.getElementById("username_span").innerHTML=username;
document.getElementById("school_span").innerHTML=school;
document.getElementById("grade_span").innerHTML=grade;
document.getElementById("word_span").innerHTML=word;
</script-->
</body>
</html>
